Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 in README code #172

Merged
merged 2 commits into from
Jan 23, 2021
Merged

ES6 in README code #172

merged 2 commits into from
Jan 23, 2021

Conversation

curran
Copy link
Contributor

@curran curran commented Dec 20, 2020

I was reading through the README and noticed ES5 in the sample code. In fact there was mixed ES5 and ES6 (some arrow function expressions, and some ES5 functions).

This PR unifies the sample code to consistently use ES6, including let, const, and arrow function expressions.

@curran
Copy link
Contributor Author

curran commented Dec 20, 2020

Related discussion: Stance on var vs. let & const? d3/d3#3435

Copy link
Member

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to follow prettier and write d => d.date rather than (d) => d.date

Other than that I approve 👍

@curran
Copy link
Contributor Author

curran commented Dec 20, 2020

Oh nice idea! Will iterate.

@curran
Copy link
Contributor Author

curran commented Dec 20, 2020

Made that change. Thanks @Fil for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to docs
Development

Successfully merging this pull request may close these issues.

2 participants